
import { observer} from "mobx-react";
import {WeaAlertPage,WeaLocaleProvider } from "ecCom"
import ProjectCondition from '../list/projectCondition'
const getLabel = WeaLocaleProvider.getLabel;

@observer
export default class ProjectInfo extends React.Component {
    constructor(props) {
       super(props);
    }
    componentDidMount(){
    }
    componentWillReceiveProps(nextProps) {
    }
    render() {
        const {prjinfoRight:{verified,hasRight},fieldInfo,form,setFormFields,setValidate } = this.props.formStore;
        if (verified && !hasRight) {
            return (<WeaAlertPage ecId={`${this && this.props && this.props.ecId || ''}_WeaAlertPage@0txrf5`} >
                    <div style={{color : '#000'}}>
                        {getLabel(2012,"对不起，您暂时没有权限！")}
                    </div>
                </WeaAlertPage>
            )
        }
        if (verified && hasRight) {
            return (
                <div style={{height:"100%"}}>
                    <ProjectCondition ecId={`${this && this.props && this.props.ecId || ''}_ProjectCondition@n8x73p`} fieldInfo={fieldInfo} form={form} setFormFields={(v)=>{setFormFields(v)}} setValidate={(v)=>{setValidate(v)}} />
                </div>)
            }
        return <div></div>
    }

}

